<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
class HTML_accounts
{
	function showAccounts( $option, &$rows, &$pageNav )
	{
	?>
	<form action="index.php" method="post" name="adminForm">
	<table class="adminlist">
		<thead>
			<tr>
				<th width="20">
					<input type="checkbox" name="toggle" value=""onclick="checkAll(<?php echo count( $rows ); ?>);" />
				</th>
				<th class="title">Abon</th>
				<th width="15%">Name</th>
				<th width="10%">Address</th>
				<th width="10%">Allsum</th>
				<th width="10%">Month|Year</th>
				<th width="10%">Sum</th>
				<th width="5%" nowrap="nowrap">Registered?</th>
			</tr>
		</thead>
		<?php
		jimport('joomla.filter.output');
		$k = 0;
		for ($i=0, $n=count( $rows ); $i < $n; $i++) {
			$row = &$rows[$i];
			$checked = JHTML::_('grid.id', $i, $row->id );
			//$published = JCommonHTML::PublishedProcessing( $row, $i );
			//$link = JOutputFilter::ampReplace( 'index.php?option=' . $option . '&task=edit&cid[]='. $row->ABON );
			$link = 'index.php?option=' . $option . '&task=edit&cid[]='. $row->ABON ;
		?>
		<tr class="<?php echo "row$k"; ?>">
			<td><?php echo $checked; ?></td>
			<td><a href="<?php echo $link; ?>"><?php echo $row->ABON; ?></a></td>
			<td><?php echo $row->NAME; ?></td>
			<td><?php echo $row->ADDRES; ?></td>
			<td><?php echo $row->ALLSUM; ?></td>
			<td><?php echo $row->MONTH . ' | ' . $row->YEAR; ?></td>
			<td><?php echo $row->SUM; ?></td>
			<td align="center"><?php echo $published;?></td>
		</tr>
		<?php
		$k = 1 - $k;
		}
		?>
		<tfoot>
		<td colspan="7"><?php echo $pageNav->getListFooter(); ?></td>
	</tfoot>
	</table>
	<input type="hidden" name="option" value="<?php echo $option;?>" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	</form>
	<?php
	}
}
?>
